//
//  ViewController.m
//  GPUImageTestProject
//
//  Created by user on 2018/11/6.
//  Copyright © 2018年 陈振旭. All rights reserved.
//

#import "ViewController.h"

#import "GPUImage/framework/Source/GPUImage.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIImage *image = [UIImage imageNamed:@"123.jpeg"];
    GPUImageVignetteFilter *disFilter = [[GPUImageVignetteFilter alloc] init];
    
    [disFilter forceProcessingAtSizeRespectingAspectRatio:image.size];
    
    [disFilter useNextFrameForImageCapture];
    
    GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:image];
    
    [stillImageSource addTarget:disFilter];
    
    [stillImageSource processImage];
    
    UIImage *newImage = [disFilter imageFromCurrentFramebuffer];
    
    _imageView.image = newImage;
    
    
}


@end
